<template>
  <div>
    <ul class="ul_box">
      <li>
        <img src="../../assets/tw/tw1.png" />
        <p>签到</p>
      </li>
      <li>
        <img src="../../assets/tw/tw2.png" />
        <p>礼卷</p>
      </li>
      <li>
        <img src="../../assets/tw/tw3.png" />
        <p>砍价</p>
      </li>
      <li>
        <img src="../../assets/tw/tw4.png" />
        <p>专栏</p>
      </li>
    </ul>
    <!-- 图文 -->
    <div class="box_big">
      <h1 class="H1" @click="kanjia">全民砍价 ></h1>
      <!-- 商品列表 -->
      <div>
        <ul>
          <li
            v-for="(item, index) in shoplist"
            :key="index"
            v-show="index <= 11 && index >= 9"
            class="li_box"
            @click="addkanjia"
          >
            <img :src="item.pic" class="img_min"/>
            <div class="div_max">
              <p class="p1">{{ item.name }}</p>
              <p>{{item.characteristic}}</p>
              <ol class="ol_box">
                  <li class="li_max">
                      <p class="p2">￥{{item.minPrice}}</p>
                      <p>低价</p>
                  </li>
                   <li class="li_max">
                      <p>￥{{item.originalPrice}}</p>
                      <p>原件</p>
                  </li>
                   <li class="li_max">
                      <p>{{item.numberSells}}件</p> 
                      <p>限量</p>
                  </li>
                  
              </ol>
            </div>
          </li>
        </ul>
      </div>
    </div>

  </div>
</template>
<script>
export default {
  data() {
    return {
      shoplist: [],
    };
  },
  mounted() {
      var id = this.$route.query.id
    this.$APL.KANJIA({
        params: {
            id: id
        }
    }).then((res) => {
    //   console.log(res.data.data);
      this.shoplist = res.data.data;
    });
  },
  methods: {
    kanjia(){
      this.$router.push({path:"/bargain"}) //跳转 全民砍价列表
    },
    addkanjia(){
      this.$router.push({path:"/bargain"})
    }
  },
};
</script>

<style lang="scss">
.ul_box {
  width: 100%;
  height: 2rem;
  background: ghostwhite;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 60px 60px 0px 0px;
  position: relative;
  top: -0.5rem;
  li {
    width: 25%;
    text-align: center;
  }
}
.box_big {
  width: 100%;
  background: white;
  color: gainsboro;
}
.H1 {
  width: 100%;
  font-size: 0.6rem;
  text-align: center;
  border-bottom: 1px solid gray;
  color: black;
}
.li_box{
    display: flex;
    margin: 0.2rem;
    border-bottom: 1px solid gray;
}
.div_max{
    margin-left: 0.5rem;
    margin: 0.2rem;
}
.li_max{
    // display: flex;
    margin-top: 0.3rem;
   width:1.5rem;
}
.ol_box{
    display: flex;
}
.p1{
    font-size: 0.3rem;
    color: black;
}
.p2{
    color: red;
}
.img_min{
    margin-bottom: 0.2rem;
    width: 25%;
}
</style>